package model;

import model.pieces.Piece;

public class Move
{
    private Cell _origin;
    private Cell _destiny;
    private Piece _piece;
    
    public Move(Piece piece, Cell destiny)
    {
        _origin = piece.getPosition();
        _destiny = destiny;
        _piece = piece;
    }

    public Move execute()
    {
        _origin.setPiece(null);
        _destiny.setPiece(_piece);
        _piece.setPosition(_destiny);
        
        return this;
    }
}
